package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 *
 */
@TableName("cms_article")
public class Article extends Model<Article> {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     *
     */
    private String title;

    /**
     *
     */
    @TableField(value = "is_open")
    private Short canOpen;

    /**
     *
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     *
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    /**
     *
     */
    @TableField(value = "create_user")
    private String createUser;

    @TableField(value = "category_id")
    private int categoryId;

    @TableField(value = "browse_num")
    private int browseMum;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Short getCanOpen() {
        return canOpen;
    }

    public void setCanOpen(Short canOpen) {
        this.canOpen = canOpen;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Override
    public Serializable pkVal(){
        return this.id;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", CanOpen=" + canOpen +
                ", GmtCreate=" + gmtCreate +
                ", GmeModified=" + gmtModified +
                ", CreateUser='" + createUser + '\'' +
                ", CategoryId='" + categoryId + '\'' +
                '}';
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public int getBrowseMum() {
        return browseMum;
    }

    public void setBrowseMum(int browseMum) {
        this.browseMum = browseMum;
    }
}
